﻿IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'proc_cm_ListRotatingBanner')
BEGIN
    PRINT 'Dropping Procedure proc_cm_ListRotatingBanner'
    DROP  Procedure  proc_cm_ListRotatingBanner
END
GO

PRINT 'Creating Procedure proc_cm_ListRotatingBanner'
GO

CREATE PROCEDURE [dbo].[proc_cm_ListRotatingBanner]
AS
BEGIN
	SET NOCOUNT ON

	SELECT 
		[rotating_banner_id]
		,[image_filename_txt]
		,[navigation_url]
		,[priority_num]
	FROM 
		[dbo].[tbl_rotating_banner] (NOLOCK)
	ORDER BY
		[priority_num]
END
GO

GRANT EXEC ON dbo.proc_cm_ListRotatingBanner TO PUBLIC
GO
